Building dataset - p.4 Data Analysis with Python and Pandas Tutorial
I want so badly to move forward on Building dataset - p.4 Data Analysis with Python and Pandas Tutorial, but I am stuck at fiddy_states = pd.read_html('https://simple.wikipedia.org/wiki/List_of_U.S._states') part. I am using Spyder to type up all my code and it has been great up until here. I am thinking it may have to do with api_key = open('-TUDblahblahblahblah','r').read()....that is not my api key of course because I dont want others to see it. Well that didnt work for me so I just didnt enter any of that and just put df = Quandl.get("FMAC/HPI_AK") instead. It work great and printed the data but when I proceeded to fiddy_states = pd.read_html('https://simple.wikipedia.org/wiki/List_of_U.S._states'), nothing worked. I hope I was able to explain that good. Oh and the error that IP IPython brings up when I tried using it was, module 'html5lib.treebuilders' has no attribute '_base'. Dont know what else to do....please HELP!
You must be logged in to post. Please login or register an account.
Hmm, I honestly have not seen an error like that. It's obviously something to do with html5lib, and for some reason an attribute appears to not be there. You could try reinstalling html5lib via pip install html5lib in your cmd.exe/terminal
-Harrison 8 years ago
You must be logged in to post. Please login or register an account.
Yeah that worked. It is crazy, I tried doing that yesterday but to no avail. Worked easily today.
-jkinser 8 years ago
You must be logged in to post. Please login or register an account.
I had to install a previous version of html5lib for compatibility:
pip install --upgrade html5lib==1.0b8
-odevaan 8 years ago
You must be logged in to post. Please login or register an account.
Thanks for sharing!
-Harrison 8 years ago
You must be logged in to post. Please login or register an account.